package com.idheima.Mianxiangjieko.noname;

public class test {
    public static void swim(Iswim iswim){
        System.out.println("开始游泳");
        iswim.swim();
        System.out.println("结束游泳");

    }


    public static void main(String[] args) {

        swim(new Iswim() {
            @Override
            public void swim() {
                System.out.println("猪游泳");
            }
        });
    }
}
